﻿@using EcBlog.Data
@using EcBlog.Extensions
@using EcBlog.Properties
@using EcBlog.Models
@model PostFooterViewModel
@{
    var siteSettings = DependencyResolver.Current.GetService<IEcUnitOfWork>().SiteSettingRepository;  
   var pageUrl = Url.GetSlugUrl(Model.Page.Published, Model.Page.Slug, "newcomment");
}

<div class="leastImportantContainer">
   <a href="@pageUrl" id="#newcomment" class="leftSubItem"> @ModelLocalization.Comments [ @Model.Page.Comments.Count ]  </a>
   
   <div class="fb-like" data-send="true" data-layout="button_count"  data-show-faces="false" data-font="tahoma"  data-href="@pageUrl" ></div>
   <a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-via="@siteSettings[SiteSettingKey.TwitterUserName]">Tweet</a>
   <script type="IN/Share" data-url="@pageUrl" data-counter="right"></script>
   <g:plusone size="medium" annotation="none" ></g:plusone>
   
    @*<div class="rigthItem">
   <a href="@Url.GetStaticPageUrl("")" >Blog</a> >
   @foreach (var item in Model.Page.Tags)  {  
       @:<a href="@Url.GetTagSlugUrl(item.TagSlug)" >  @item.TagName  </a>
   }>
   <a href="@Url.GetSlugUrl(Model.Page.Published, Model.Page.Slug)" ><span>@Model.Page.Title</span></a>
    </div>   *@
</div>


@if (Model.ShowComments)
{
   foreach (var comment in Model.Page.Comments)
   {
   <article>  
       <header>  
           @comment.UserName (@comment.Created.ToString(siteSettings[SiteSettingKey.DateFormat] + " " + siteSettings[SiteSettingKey.TimeFormat]) )
       </header>  
       <p>@comment.CommentHtml</p>  
   </article>  
   }
}
@if (Model.ShowAddNewCommentPanel && Model.Page.IsCommentable)
{
   @Html.Action("NewComment", "Blog", new { pageId = Model.Page.PageId })
}

<img src="@Url.Content("~/Content/images/hr.png")" alt="footer" width="100%"/>